home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Applications / vim / everything else / macros / keyword < prev    next >
Encoding:
Text File  |  1994-11-22  |  520 b   |  18 lines  |  [TEXT/VIM!]

  1. " Some handy keyword-completion macros.
  2. " The word in front of the cursor is taken as a search string, the previous
  3. " partially matching word is found which then replaces the word in front
  4. " of the cursor. The macros work in insert mode.
  5. "
  6. " ^K searches backward for the first match
  7. " ^N searches backward for the next match (after ^K)
  8. " ^P searches forward for the previous match (after ^K)
  9. "
  10. " Thanks to Dave Caughey.
  11. "
  12. :map!   
  13. bmmi?\<`m"nyf
  14. @nmn"nyw`mcf
  15. n
  16. :map!  .`nnmn"nyw`mcf.n
  17. :map!  .`nNmn"nyw`mcf.n
  18.